package ch10;

import java.util.Scanner;

public class Zxf2 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入数组数据：");
        int[] a=new int[15];
        for (int i=0;i<a.length;){
            int b=in.nextInt();
            if (!(b>=0&&b<=100)){
                System.out.println("输入错误；请重新输入：");
                continue;
            }
            a[i]=b;
            i++;
        }
        for (int i=0;i<a.length;i++){
            System.out.print(a[i]+"  ");
        }
    }
}
